This invention relates generally to the field video display systems. More particularly, this invention relates to a computer video graphics system capable of displaying multiple windows each having a selectively assigned virtual colormap within one physical color lookup table.
In computer video graphics systems, a monitor displays frames of information provided by a frame buffer many times a second. The subsystem of a video graphics system between the frame buffer and the monitor is called the video datapath. As the format and content of video data become increasingly complex, the capability of video displays increases. For example, providing the feature of windows in graphics systems increases the demand on and complexity of the video datapath. Large volumes of digital data in the form of state information are called for to define window boundaries and other window attributes or characteristics. Further, pixel values in a frame buffer or provided from some other source are manipulated in graphics display systems in order to display proper colors on a graphics monitor. Color lookup tables (colormaps) are commonly used to provide color values to a digital to analog converter (DAC) to be displayed on the monitor.
Graphics terminals, as opposed to graphics workstations, are designed to be controlled by a single application at a time. Graphics terminals have only one colormap, which is controlled by the same application that controls the screen.
A multi-window graphics workstation allocates portions of this screen among multiple applications. Window systems allow graphics workstations to display data from multiple applications at the same time. Each window may have different purposes that require using a different set of colors. If specific planes of the frame buffer directly control the DAC or DACs that drive the monitor, then there is no colormap and the problem of allocating control of the colormap is avoided.
Virtual colormaps allow multiple windows to use independent sets of colors. Displaying from multiple colormaps simultaneously requires some means to select among multiple colormaps based on the window containing each pixel.
Multi-window graphics workstations that have colormaps must address the problem of allocating control of the colormap. Early known graphics systems simply gave the entire colormap to some one window, causing other windows to display in false colors. Other known graphics systems solved this problem in a limited way by putting fixed values into 16 colormap entries and allowing a single application to control the rest of a 256 entry colormap. Applications that needed only a few colors out of a limited range could use the fixed colors as some other applications used the rest of the colormap. Applications that needed all 256 colors could perform a special request to get the entire colormap. This is not a virtual colormap because it is limited to a predefined set of colors plus one application colormap.
Most known workstations support only a single colormap. Windows that use different sets of colors can only be displayed correctly one at a time. Some workstations provide multiple colormaps. This is generally in the form of multiple separate physical colormaps, with some form of bank selection to choose which colormap to use at each pixel. In general, this is done using extra planes in the frame buffer.
Virtual colormaps can be implemented in software. This involves packing together multiple colormaps requested by multiple windows into a single hardware colormap as indexed by the frame buffer, and then altering drawing operations to the frame buffer so that high order bit planes are set as needed to make each window index the correct part of the single physical colormap. The pixel values written into the frame buffer are modified to reference the desired portion of the physical colormap. However, this approach has several problems, the most important of which is the need to restrict colormaps to powers of two in size and to allocate them on similar powers of two boundaries. That is necessary to restrict the changes in the frame buffer pixel values to unused high order bits. Some applications depend on the relationship between different pixel values. Because of this, the bits of each pixel that are used to look up the color within a virtual colormap must not be changed.
A key problem in color, multi-window workstations is how to allow different windows, possibly controlled by different processes running totally different applications, to use the same physical colormap. Many advanced graphics applications require the ability to specify their own sets of colors. If all other windows disappear or are displayed in false colors when using these applications, then the workstation has in effect become a single window workstation. Worse, system colors used for the screen background and window borders may become indistinguishable when running these advanced applications, so that the user interface becomes very difficult to use.
It would be advantageous to have a simple and efficient implementation of virtual colormaps. This would allow multiple windows to easily be displayed in their proper colors, even though each could use a different set of colors. Since multiple colormaps would be packed efficiently, the largest possible number of virtual colormaps could be loaded at once, given the size of the physical colormap, so that as many windows as possible could be displayed in their proper colors.
It is also desirable to have multiple colormaps that are associated with different windows on the screen to be allocated and deallocated as a virtual resource, without requiring changes to the pixel values in the frame buffer.
It is desirable that the virtual colormaps required by different windows be of different sizes. With virtual colormaps of different sizes, a means is required for efficiently packing them into the physical colormap, with as little wasted space as possible. More importantly, the allocation process must be simple, to reduce the effort needed to write system software that manages the colormap. Reallocation of virtual colormaps must also be fast, so that changing the set of allocated colormaps does not significantly reduce system performance.
It is also desirable that multiple virtual colormaps be combined into a single physical colormap by appending them to each other. If this were so, there would be no alignment restrictions on where a virtual colormap may start within the physical colormap, and no restrictions on the lengths of individual virtual colormaps. The physical colormap may be treated as a linear address space of pixel-to-color translations, and each virtual colormap could use any contiguous set of entries in it.
With such an arrangement it would be simple to allocate colormaps with minimal wasted space. Finally, reallocating colormaps would require changes only in a table of base values and the colormap entries themselves. Since the pixel values in the frame buffer would not have to be changed, colormap reallocation would be fast.